package comc.redis;


import org.junit.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;



@Component
public class RedisTest {

    @Autowired
    private RedisTemplate redisTemplate;


    @Test
    public void test1() {
        System.out.println(redisTemplate);
        redisTemplate.opsForValue().set("name", "杨安华");
        System.out.println(redisTemplate.opsForValue().get("name"));

    }


}
